/* 基础布局样式 */
.app-container {
    display: flex;
    height: 100vh;
    flex-direction: row;
}

/* 侧边栏样式 */
.sidebar {
    width: 200px;
    background: #2c3e50;
    color: white;
    padding: 20px;
    transition: transform 0.3s ease-in-out;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    padding: 15px;
    cursor: pointer;
}

.sidebar li:hover {
    background: #1f2d3d;
}

/* 小屏幕隐藏侧边栏 */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
    }
    .sidebar.sidebar-hidden {
        transform: translateX(-100%);
    }
    .sidebar:not(.sidebar-hidden) {
        transform: translateX(0);
    }
}

/* 主要内容区域 */
.main-content {
    flex-grow: 1;
    padding: 20px;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
}

/* 图片总览页面 */
.image-overview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.image-table, .table-details {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
}

.image-table {
    width: 100%;
    max-width: 30%;
}

.table-details {
    width: 100%;
    max-width: 40%;
    background: #fff;
    border: 1px solid #ddd;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

li:hover {
    background: #ddd;
}

.details p {
    margin: 5px 0;
    font-size: 14px;
}

.tag_details {
    margin: 5px 0;
    font-size: 14px;
    background-color: #f1e6f5; /* 淡雅的紫色背景 */
    color: #6f42c1; /* 优雅的深紫色文本 */
    padding: 5px; /* 增加内边距以增强视觉效果 */
    border-radius: 4px; /* 圆角边框 */
}

.image-preview {
    margin-top: 10px;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 5px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    width: 100%;  /* 确保分页容器占满页面宽度 */
    justify-content: center;  /* 居中分页按钮 */
}

.pagination button {
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button.active {
    background: #007bff;
    color: white;
}

.pagination select {
    padding: 5px;
}

/* 标签管理 */
.tag-container {
    padding: 20px;
}

.tag-level {
    margin-bottom: 20px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

button {
    padding: 8px 12px;
    font-size: 14px;
    border: none;
    background-color: #42b983;
    color: white;
    cursor: pointer;
    border-radius: 5px;
}

button:hover {
    background-color: #358a6b;
}

/* 新增按钮样式 */
.add-btn {
    margin-left: 10px;
    padding: 6px 10px;
    font-size: 12px;
    background-color: #ff9800;
}

.add-btn:hover {
    background-color: #e68900;
}

/* 图片管理页面 */
.image-container {
    text-align: center;
    padding: 20px;
}

.tag-section {
    text-align: left;
    margin-bottom: 20px;
}

.tag-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.tag-title {
    width: 100px;
    font-weight: bold;
}

.image-gallery {
    margin-top: 20px;
}

.images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.image-item {
    text-align: center;
}

.image-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

.image-container {
    padding: 20px;
    background: #f4f4f4;
    color: black;
    min-height: 100vh;
}

.tag-section, .image-gallery {
    margin-bottom: 20px;
}

.images {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.image-item {
    text-align: center;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
}

.image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
}

.full-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.full-screen img {
    max-width: 90%;
    max-height: 90%;
}

/* 新增的下拉框样式 */
.month-selection {
    padding: 5px;
    margin: 10px 0;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: left; /* 使内容靠左对齐 */
    width: 100%; /* 可选，确保它占据足够的宽度 */
}

/* 图片总览分页容器 */
.content {
    display: flex;
    width: 100%;
    height: 500px; /* 固定高度 */
}

.image-list, .table-details {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.image-list {
    border-right: 1px solid #ddd;
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

button {
    padding: 5px 10px;
}

button.active {
    background-color: #007bff;
    color: white;
}

select {
    padding: 5px;
    font-size: 14px;
}
.checkbox-container {
    display: inline-flex;
    align-items: center;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    transform: scale(1.5);
    cursor: pointer;
}

.file-name {
    margin-left: 10px; /* 让复选框和文字之间有间隔 */
    cursor: pointer;
    user-select: none;
}
/* 标签弹窗样式 */
.tag-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.tag-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 80%;
    max-height: 80%;
    overflow-y: auto;
}

/* 已选择标签区域样式 */
.selected-tags {
    margin-bottom: 20px;
}

.selected-tags ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.selected-tags li {
    margin: 5px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    white-space: nowrap;
}

.selected-tags button {
    margin-left: 10px;
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* 标签列表横向滚动样式 */
.scrollable {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 20px;
}

.scrollable li {
    margin: 5px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    white-space: nowrap;
    cursor: pointer;
}

.scrollable li button {
    margin-left: 10px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* 提交按钮样式 */
.tag-modal-content button {
    margin: 5px;
    padding: 5px 10px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.tag-modal-content button:hover {
    background-color: #45a049;
}